package com.ruoyi.web.controller.basic;

import com.ruoyi.basic.domain.Show;
import com.ruoyi.system.domain.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.basic.service.ShowService;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping
public class ShowController {
    @Autowired
    private ShowService showService;
    /**
     * 获取考勤记录统计数据
     */
    @PostMapping("show")
    public Result findRecordList(@RequestBody Show show){
        Result<ArrayList> result = new Result();
        result.setData(showService.findRecordList(show));
        result.setState(200);
        result.setMessage("获取成功");
        return result;
    }
    /**
     * 获取全校考勤记录统计数据
     */
    @PostMapping("index")
    public List<Show> findAllRecordList(@RequestBody Show show){
//        Result<ArrayList> result = new Result();
//        result.setData(showService.findAllRecordList(show));
//        result.setState(200);
//        result.setMessage("获取成功");
        return showService.findAllRecordList(show);
    }
}
